Part Number Hot Search : 
TRRPB P136000 MC140 C29302 BC859A 1SS400G MBRS1 BUV21
Product Description
Full Text Search
 

To Download W921E880 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 W921E880A/W921C880 4-BIT MICROCONTROLLER
Table of Contents1. GENERAL DESCRIPTION .........................................................................................................................3 2. FEATURES.................................................................................................................................................3 3. PIN CONFIGURATION ...............................................................................................................................6 4. PIN DESCRIPTION.....................................................................................................................................7 5. BLOCK DIAGRAM ......................................................................................................................................9 6. FUNCTIONAL DESCRIPTION .................................................................................................................10 6.1 ROM Memory Map .........................................................................................................................10 6.2 RAM Memory Map..........................................................................................................................11 6.2.1 Special Control Reg. Area..................................................................................................11 6.2.2 Stack Reg. Area.................................................................................................................12 6.2.3 Working Reg. Area ............................................................................................................12 6.3 Internal Oscillator Circuit .................................................................................................................13 6.4 Initial State ......................................................................................................................................14 6.5 Input/Output ....................................................................................................................................14 6.5.1 I/O Pull High and Open Drain Control.................................................................................17 6.6 Serial Port.......................................................................................................................................19 6.7 DTMF Generator.............................................................................................................................21 6.8 Beep Tone Generator.....................................................................................................................22 6.9 8-bit D/A Converter.........................................................................................................................23 6.10 Comparator...................................................................................................................................24 6.11 Timer 0-3......................................................................................................................................25 6.11.1 Arbitrary Waveform Generator.........................................................................................32 6.12 Interrupt.........................................................................................................................................33 6.12.1 Interrupt Control Register ..................................................................................................33 6.12.2 Interrupt Enable Flag........................................................................................................34 6.13 Operating Mode............................................................................................................................34 6.14 Initial Condition Register of EPROM Program Method .................................................................39 6.15 Reset ............................................................................................................................................39
-1-
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
7. ADDRESSING MODE ..............................................................................................................................40 7.1 ROM Addressing Mode ..................................................................................................................40 7.2 RAM Addressing Mode...................................................................................................................40 7.3 Look-up Table Addressing Mode (1 Word/2 Cycles) ......................................................................42 8. SPECIAL CONTROL REG. FORMAT ......................................................................................................43 9. INSTRUCTION MAP.................................................................................................................................45 10. INSTRUCTION SETS .............................................................................................................................48 11. ABSOLUTE MAXIMUM RATINGS .........................................................................................................51 12. ELECTRICAL CHARACTERISTICS.......................................................................................................52 12.1 AC Characteristics ........................................................................................................................52 12.2 DC Characteristics........................................................................................................................54 13. PACKAGE DIMENSIONS.......................................................................................................................56 80-pin QFP ............................................................................................................................................56
-2-
W921E880A/W921C880
1. GENERAL DESCRIPTION
The W921E880A/W921C880 are 4-bit micro-processor fabricated by CMOS process. With a single channel DTMF generator, an 8-bit D/A converter circuit, a built in four by one channel comparator circuit and four multi-function timers. The excellent memory structure, 8K super EPROM in W921E880A and 8K mask ROM in W921C880 for program code and 1536 x 4 bit RAM minimize the need for external memory devices. The W921E880A/W921C880 provides good solution for consumming application, especially for telecommunication design with few external components. Using the serial transmit/receive function, the W921E880A/W921C880 can interface with the Winbond LCD driver IC using the serial control circuit.
2. FEATURES
Memory
* ROM (Super EPROM): 8K x 10 bits * RAM: 1536 x 4 bits
- - - - -
64 x 4 bit Special registers 16 x 4 bit Working registers 128 x 4 bit General registers 304 x 4 bit Multi-purpose registers4 bit serial buffer registers 512 x 4-bit x 2 banks
Dual-clock Operation
* Crystal or RC for the main system clock: RC up to 4 MHz
Crystal for 400 K, 800 K, 2 M, 3.58 M, 4 MHz * Crystal for subsystem clock: 32.768 KHz
I/O Pins
* 32 bidirectional and individually controllable I/O lines:
- P0 Port: P0.0-P0.3 large drive current Pins - P1 Port: P1.0-P1.3 large drive current Pins - P2 Port: P2.0-P2.3 large sink current pins and open drain option - P3 Port: P3.0-P3.3 multi-function I/O - P4 Port: P4.0-P4.3 open drain and pull high resistor option, multi-function I/O - P5 Port: P5.0-P5.3 multi-function I/O - P6 Port: P6.0-P6.3 open drain and pull high resistor option, multi-function I/O - P7 Port: P7.0-P7.3 large sink current pins and open drain option
* 32 bidirectional I/O lines:
- P8 Port: P8.0-P8.3 large drive current pins - P9 Port: P9.0-P9.3 large sink current pins and open drain option Publication Release Date: July 1999 Revision A3
-3-
W921E880A/W921C880
- PA Port: PA.0-PA.3 open drain and pull high resistor option - PB Port: PB.0-PB.3 open drain and pull high resistor option - PC Port: PC.1-PC.3 open drain and pull high resistor option - PD Port: PD.0-PD.3 open drain and pull high resistor option - PE Port: PE.0-PE.3 - PF Port: PF.0-PF.3
Interrupt
* Four External sources: INT0 ( P4.3 )
P4 Port ( P4.0-P4.2 )
* Six Internal sources: Timer 0
Timer 1 Timer 2 Timer 3 Comparator Serial Port
Timer/Counter
* Timer 0: 2-19 order divider (double source)
Auto-reload timer Watch-dog timer
* Timer 1: 2-19 order divider
Auto-reload timer Arbitrary waveform generator External event counter
* Timer 2: 2-19 order divider
Auto-reload timer Arbitrary waveform generator Period/Pulse width measurement function
* Timer 3: 2-19 order divider
Auto-reload timer
Operating Mode (System Clock)
* Normal mode: System clock operating * HOLD mode: no operation except for oscillator (System clock stops only) * STOP mode: no operation including oscillator
-4-
W921E880A/W921C880
DTMF Generator and 8-bit D/A Converter
* One Channel DTMF Generator * One Channel 8-bit D/A Converter
Voltage Comparator
* Four by one Channel Voltage Comparator
Serial I/O Interface
* Clock Synchronous multi-nibbles Serial Transmitter/Receiver Interface
Stack
* 8-bit Stack Pointer
Address Mode
* ROM: Indirect call addressing mode
Long jump/call addressing mode
* RAM: Direct addressing mode
Indirect addressing mode Working reg. addressing mode
* Look-up table addressing mode
Instruction Sets
* 117 Instruction sets
Operating Voltage
* 2.8 to 5.5V operating voltage for W921E880A EPROM Type * 2.4 to 5.5V operating voltage for W921C880 Mask ROM Type
Package Type
* Packaged in 80-pin QFP
-5-
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
3. PIN CONFIGURATION
D B T T NM GCF
P x C . 3
P x C . 2
P x C . 1
P x C . 0
P x F . 3
P x F . 2
P x F . 1
P PPP x xxx VEEE F . D. . . 0D321
P x E . 0
PxD.0 PxD.1 PxD.2 PxD.3 RESET OSCO OSCI VDD Px0.0 Px0.1 Px0.2 Px0.3 Px1.0 Px1.1 Px1.2 Px1.3 Px2.0 Px2.1 Px2.2 Px2.3 Px3.0/ANI0 Px3.1/ANI1 Px3.2/ANI2 Px3.3/ANI3
8 777777777 76 6666 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 64 63 2 62 3 61 4 60 5 59 6 58 7 57 8 56 9 55 10 54 11 53 12 W921E880A 52 13 / W921C880 51 14 50 15 49 16 48 17 47 18 46 19 45 20 44 21 43 22 42 23 24 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 41 5678901234567890 NX/ NPPP CT XCx x x 444 T ... 012 PNVPPP x CSx x x 4 S777 ... . 3 012 / I N T 0 P x 7 . 3 P x 5 . 0 / T M 1 P x 5 . 1 / T M 2
PxB.3 PxB.2 PxB.1 PxB.0 NC PxA.3 PxA.2 PxA.1 PxA.0 Px9.3 Px9.2 Px9.1 Px9.0 Vss Px6.3/RCLK Px6.2/RDATA Px6.1/WCLK Px6.0/WDATA Px8.3 Px8.2 Px8.1 Px8.0 Px5.3/DAOUT Px5.2/Vref
-6-
W921E880A/W921C880
4. PIN DESCRIPTION
SYMBOL OSCI
OSCO
* * * *
I/O I O I/O I/O I/O I/O
FUNCTION Main-oscillator input pin with internal cap. Main-oscillator output pin. I/O port A. I/O port B. I/O port C. PC.3 can be as 32.768 KHz output buffer. I/O port D. I/O port E. I/O port F. I/O with large drive current pin. I/O with large drive current pin. I/O with large sink current pin. I/O port 3 or Analog input pins (ANI0-ANI3).
PA.0-PA.3 PB.0-PB.3 PC.0-PC.3 PD.0-PD.3 PE.0-PE.3 PF.0-PF.3 P0.0-P0.3 P1.0-P1.3 P2.0-P2.3 P3.0/ANI0 | P3.3/ANI3 P4.0 P4.1 P4.2 P4.3/INT0 P5.0/TM1 P5.1/TM2 P5.2/VREF P5.3/DAOUT P6.0/WDATA P6.1/WCLK P6.2/RDATA P6.3/RCLK P7.0-P7.3 P8.0-P8.3 P9.0-P9.3
I/O I/O I/O I/O
>
I/O
I/O
* * * *
I/O I/O I/O I/O
I/O port 4.0 or the port P4.0 interrupt input pin. I/O port 4.1 or the port P4.1 interrupt input pin. I/O port 4.2 or the port P4.2 interrupt input pin. I/O port 4.3 or the INT0 input pin. I/O port 5.0 or the control pin of the TIMER 1. I/O port 5.1 or the control pin of the TIMER 2. I/O port 5.2 or the Vref input pin of the comparator. I/O port 5.3 or the output pin of the 8bit D/A. I/O port 6.0 or the data output pin of the serial interface. I/O port 6.1 or the clock I/O pin of WDATA. I/O port 6.2 or the data input pin of the serial interface. I/O port 6.3 or the clock I/O pin of RDATA. I/O with large sink current pin. I/O with large drive current pin. I/O with large sink current pin.
I/O I/O I/O I/O
* * * *
I/O I/O I/O I/O
I/O
>
I/O
>
I/O
-7-
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
4. Pin Description, continued
SYMBOL DTMF BTG RESET VDD VSS XT
XT
Notes:
I/O O O I I I I O
FUNCTION Dual tone multi-frequency output pin. Beep Tone Generator output pin. Reset input pin with low active. Positive power supply input pin. Negative power supply input pin. 32.768 KHz subsystem clock input pin with internal cap. 32.768 KHz subsystem clock output pin.
* open drain and pull high resistor option by software > open drain option by software
-8-
W921E880A/W921C880
5. BLOCK DIAGRAM
PORT P0 P0.0-P0.3
PROGRAM COUNTER
PORT P1
Co-V REG. Co-U REG.
P1.0-P1.3
PORT P2 EPROM 10 * 8K
W REG. V REG. U REG.
P2.0-P2.3
PORT P3 DECODER & CONTROL RESET STACK POINTER ALU PORT P5 B REG. A REG. PORT P4
P3.0-P3.3
P4.0-P4.3
P5.0-P5.3
RAM 4 * 1536
PORT P6
PORT MODE REGISTER
P6.0-P6.3
PORT P7 PE.0-PE.3 PORT PE PF.0-PF.3 PORT PF PORT P9 PORT P8
P7.0-P7.3
P8.0-P8.3
P9.0-P9.3
PORT PD XT
OSCILLATOR
PD.0-PD.3
XT OSCI OSCO
and
SYSTEM PRESCALER TIMER 0 TIMER 1 TIMER 2 TIMER 3
PORT PA
PA.0-PA.3
PORT PB
PB.0-PB.3
PORT PC VDD VSS
DTMF GENERATOR P3.0(ANI0) P3.1(ANI1) P3.2(ANI 2) P3.3(ANI3) P5.2/VREF
PC.0-PC.3
DTMF
+ DAMSB
BEEP TONE GENERATOR
BTG
DALSB
D/A CONVERTOR
P5.3/DAOUT
-9-
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
6. FUNCTIONAL DESCRIPTION
6.1 ROM Memory Map
0000H
Interrupt Area
000FH 0010H
Indirect Call and Look-up Table Area
Long Call/Jump Area
0FFFH 1000H
1FFFH 8192 x 10-bit
0000H 0001H 0002H 0003H 0004H 0005H 0006H 0007H 0008H 0009H 000AH 000BH 000CH 000DH 000EH 000FH
JMPL Instruction (RESET) XXXXX XXXXX
JMPL Instruction (INT0) XXXXX XXXXX
JMPL Instruction (TM 0) XXXXX XXXXX
JMPL Instruction (TM1) XXXXX XXXXX
JMPL Instruction (TM 2) XXXXX XXXXX
JMPL Instruction (Comparator / TM 3) XXXXX XXXXX
JMPL Instruction (P4.0 to P4.2 - 3 PINS) XXXXX XXXXX (SERIAL PORT)
JMPL Instruction XXXXX XXXXX
PRIORITY: RESET > INT0 > TM0 > TM1 > TM2 > ( Comparator / TM3 ) > P4.0 to P4.2 > SERIAL PORT
- 10 -
W921E880A/W921C880
6.2 RAM Memory Map
000H 000
SPECIAL CONTROL REG.
03FH 040H 063 064
WORKING REG.
04FH 050H 07FH 080H 079 080
SERIAL CONTROL REG. STACK REG. OR GENERAL REG.
127 128
STACK REG.
(40H - FFH)
0FFH 100H
255 256
SERIAL CONTROL REG. OR GENERAL REG.
17FH 180H 383 384
SERIAL CONTROL REG.
(50H - 14EH)
GENERAL REG.
GENERAL REG.
1FFH 200H 511 512
BANK0 BANK1
3FFH 1023
6.2.1 Special Control Reg. Area There are 64 reg. x 4 bits in the special control register area. All control registers such as the DTMF Control Reg., System Clock Control Reg. ...etc. are in this area. Please refer to the Spesial Control Reg. Format. Bank Select Reg. BKSR REG: (ADDRESS = 001H) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 1 Reserved Reserved 1 b0 0 1 0 1 BANK NO. 0 1 Reserved Reserved
The Bank Select Reg. can select the active bank. The memory size of each bank is 512*4 bits. Bank 0 and bank 1 are normal SRAM.
- 11 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
6.2.2 Stack Reg. Area There are 8 bit stack pointers in this chip located at addresses 040H - 0FFH. After a power on reset the stack pointer will be set to 0FFH. The stack pointer will be decreased by 4 each time a CALLP or interrupt occurs, and will be increased by 4 each time the RTN or RTNI instruction is executed. The format of the stack pointer is shown in the following table.
0F8H 0F9H 0FAH 0FBH 0FCH 0FDH 0FEH 0FFH
Z PC11 PC7 PC3 Z PC11 PC7 PC3
C PC10 PC6 PC2 C PC10 PC6 PC2 PC9 PC5 PC1 PC9 PC5 PC1
PC12 PC8 PC4 PC0 PC12 PC8 PC4 PC0
STACK 1
STACK 0
6.2.3 Working Reg. Area The area located from 040H to 04FH is known as the Working Reg. The instruction MOV WRn, A or MOV A, WRn can move the A reg. data to the Working reg. or move the Working reg. data to the A reg. directly within 1 word/1 machine cycle. Unlike other direct instructions such as MOV Mx, A or MOV A, Mx, these instructions use 2 words/2 machine cycles. Therefore, the Working reg. can reduce the ROM program memory size and improve the control speed of the application circuit. For arithmetic and logic operations only WR0-WR7 are available, that is only 040H to 047H can be active. The instructions are as follow: ADD ADC SUB SBC ANL ORL XRL CMP A, A, A, A, A, A, A, A, WRx WRx WRx WRx WRx WRx WRx WRx
where x = 0 -- 7.
- 12 -
W921E880A/W921C880
6.3 Internal Oscillator Circuit
There are dual clocks in this chip, one is a high speed clock, the other a low speed clock. The block diagram is shown below:
f TM0
TM0
TM1
TM2
TM3
f SYS1
MUX0
f SYS0
MUX0
f TM1
MUX1
f TM2
MUX2
f TM3
MUX3
SYSCCR.0
11-bit Prescaler
f SYS System Clock f OSC
(1/4)
SYSCCR.3
f1 f2
*
fH
OSCI
Crystal Type or RC Type
OSCO
Enable (SYSCCR.1)
5-bit Prescaler
2-bit Scaler (1/4)
fL
1-bit Scaler (1/2)
XT
Crystal Type
XT
Enable (SYSCCR.2)
* Default: cystal type, f1=f H, f2=fL (refer to 6.14 INI register)
The format of the system clock control reg. (SYSCCR) is shown below: SYSCCR REG: ( ADDRESS = 000H, Default data = 0H)
b3 b2 b1 b0 0 : f TM0 = fsys0 1 : f TM0 = fsys1 0 : f H enable 1 : f H disable 0:f 1:f
L L
enable disable
1 2
0 : fosc = f 1 : fosc = f
The W921E880A/W921C880 provides a crystal or RC oscillation circuit selected by bit0 of the INI register (refer to 6.14 INITIAL CONDITION Section) to generate the system clock through external connections. If a crystal oscillator is used, a crystal or ceramic resonator must be connected to OSCI and OSCO , and the capacitor must be connected if an accurate frequency is needed. The oscillator configuration is shown as follows.
OSCI or OSCO Crystal Type OSCO RC Type OSCI
- 13 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
6.4 Initial State
The W921E880A/W921C880 is reset either by power-on reset or by using the external RESET pin. The initial state of the W921E880A/W921C880 after the reset function is executed is described below. The EVF interrupt request signal register value is random, so user must do CLR EVF, #11111111b instruction to clear all interrupt request signals after power-on reset. Program counter (PC) Stack pointer Special function registers TM0, TM1, TM2, TM3 input clock TM0, TM1, TM2, TM3 contents Input/Output PM registers DTMF output EVF interrupt request signal register 0000H 0FFH Refer to special control register table FOSC/8 0FFH Input mode 1111B Disable (H-Z) Random
6.5 Input/Output
There are 64 I/O pins (4 pins x 16 ports) including 12 large drive current pins, and 12 large sink current pins in this chip. All the I/O pins will remain in an input mode after a power on reset. The input or output status of port 0 to port 7 can be controlled by the port mode register PMx, where x = 0 to 7. A zero indicates the corresponding pin is an output, a one indicates the relative pin is an input. For example, MOV PM0, #0101B sets P0.0 and P0.2 as inputs and P0.1 and P0.3 as outputs. The I/O instructions cannot affect the I/O status in Port 0 to Port 7. The input or output mode of port 8 to port F only can be decided by I/O instructions. For example, MOV A, Px will change Px to input mode and MOV Px, A will change it to output mode. The I/O instructions are described as follows: MOV MOV MOV MOV A, Px B, Px Px, A Px, B input Port x to A reg. input Port x to B reg. output A reg. data to Port x. output B reg. data to Port x.
* P0.0-P0.3: * P1.0-P1.3:
Four 10 mA drive current pins Normal I/O pins only. Four 10 mA drive current pins Normal I/O pins only. Normal function is the same as port P0 Four 15 mA sink current pins Normal I/O pins only. Normal function is the same as port P0
* P2.0-P2.3:
- 14 -
W921E880A/W921C880
* P7.0-P7.3:
Four 15 mA sink current pins Normal I/O pins only. Normal function is the same as port P0 Multi-function I/O pins. Normal function is the same as port P0 Special function input pins P3IO REG: (ADDRESS = 00FH) (Default data = 0H)
b3 b2 b1 b0 0: Normal I/O P3.0 1: Analog input pin 0 -- ANI0 0: Normal I/O P3.1 1: Analog input pin 1 -- ANI1 0: Normal I/O P3.2 1: Analog input pin 2 -- ANI2 0: Normal I/O P3.3 1: Analog input pin 3 -- ANI3
* P3.0-P3.3:
* P4.0-P4.3:
Multi-function I/O pins. Normal function is the same as port P0 Special function input pins P4IO REG: (ADDRESS = 010H) (Default data = 0H)
b3 b2 b1 b0 0: 1: 0: 1: 0: 1: 0: 1: Normal I/O P4.0, interrupt disable Interrupt port P4.0 Normal I/O P4.1, interrupt disable Interrupt port P4.1 Normal I/O P4.2, interrupt disable Interrupt port P4.2 Normal I/O P4.3, interrupt disable INT0
- 15 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
* P5.0-P5.3: Multi-function I/O pins. Normal function is the same as port P0 Special function P5IO REG: (ADDRESS = 011H) (Default data = 0H)
b3 b2 b1 b0 0: Normal I/O P5.0 1: Work as the timer 1 control pin 0: Normal I/O P5.1 1: Work as the timer 2 control pin 0: Normal I/O P5.2 1: Work as the Vref input pin of the comparator 0: Normal I/O P5.3 1: Work as the output pin of D/A converter (DAOUT)
* P6.0-P6.3 :
Multi-function I/O pins. Normal function is the same as port P0 Special function P6IO REG: (ADDRESS = 012H) (Default data = 0H)
b3 b2 b1 b0 0: Normal I/O P6.0 1: Work as the data output pin of the WCLK pin (WDATA) 0: Normal I/O P6.1 1: Work as the clock I/O pin of the WDATA pin (WCLK) 0: Normal I/O P6.2 1: Work as the data input pin of the RCLK pin (RDATA) 0: Normal I/O P6.3 1: Work as the clock I/O pin of the RDATA pin (RCLK)
* P8.0-P8.3 :
Four 10 mA drive current pins Normal I/O pins only. Normal function is the same as port P0 Four 15 mA sink current pins Normal I/O pins only. Normal function is the same as port P0 Normal I/O pins only. Normal function is the same as port P0 Normal I/O pins only.
* P9.0-P9.3 :
* PA.0-PA.3 : * PB.0-PB.3 :
- 16 -
W921E880A/W921C880
Normal function is the same as port P0 * PC.0-PC.3: * PD.0-PD.3: * PE.0-PE.3: * PF.0-PF.3: Normal I/O pins only. Normal function is the same as port P0 Normal I/O pins only. Normal function is the same as port P0 Normal I/O pins only. Normal function is the same as port P0 Normal I/O pins only. Normal function is the same as port P0
6.5.1 I/O Pull High and Open Drain Control Some of the above I/O ports can be set up with a pull-high resistor or as an open drain. The user can program the I/O through the special register so that the I/O can have a pull-high resistor or open drain characteristics. All pull-high resistors in the following table are 400 K in a 3.0 voltage test condition. After a power on reset the following special reg. will all reset to "0000". * P4.0-P4.3: P4PH REG: (ADDRESS = 003H) (Default data = 0H)
b3 b2 b1 b0 0: P4.0 without pull-high resistor 1: P4.0 with pull-high resistor 0: P4.1 without pull-high resistor 1: P4.1 with pull-high resistor 0: P4.2 without pull-high resistor 1: P4.2 with pull-high resistor 0: P4.3 without pull-high resistor 1: P4.3 with pull-high resistor
P4TP REG: (ADDRESS = 004H) (Default data = 0H)
b3 b2 b1 b0 0: P4.0 work as CMOS type 1: P4.0 work as Open-drain type 0: P4.1 work as CMOS type 1: P4.1 work as Open-drain type 0: P4.2 work as CMOS type 1: P4.2 work as Open-drain type 0: P4.3 work as CMOS type 1: P4.3 work as Open-drain type
- 17 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
* P6.0-P6.3: P6PH REG: (ADDRESS = 005H) (Default data = 0H)
b3 b2 b1 b0 0: P6.0 without pull-high resistor 1: P6.0 with pull-high resistor 0: P6.1 without pull-high resistor 1: P6.1 with pull-high resistor 0: P6.2 without pull-high resistor 1: P6.2 with pull-high resistor 0: P6.3 without pull-high resistor 1: P6.3 with pull-high resistor
P6TP REG: (ADDRESS = 006H) (Default data = 0H)
b3 b2 b1 b0 0: P6.0 work as CMOS type 1: P6.0 work as Open-drain type 0: P6.1 work as CMOS type 1: P6.1 work as Open-drain type 0: P6.2 work as CMOS type 1: P6.2 work as Open-drain type 0: P6.3 work as CMOS type 1: P6.3 work as Open-drain type
* PA, PB, PC, PD: PABCDPH REG: (ADDRESS = 007H) (Default data = 0H)
b3 b2 b1 b0 0: PA(4PINS) without pull-high resistor 1: PA(4PINS) with pull-high resistor 0: PB(4PINS) without pull-high resistor 1: PB(4PINS) with pull-high resistor 0: PC(4PINS) without pull-high resistor 1: PC(4PINS) with pull-high resistor 0: PD(4PINS) without pull-high resistor 1: PD(4PINS) with pull-high resistor
- 18 -
W921E880A/W921C880
PABCDTP REG: (ADDRESS = 008H) (Default data = 0H)
b3 b2 b1 b0 0: PA(4PINS) work as CMOS type 1: PA(4PINS) work as Open-drain type 0: PB(4PINS) work as CMOS type 1: PB(4PINS) work as Open-drain type 0: PC(4PINS) work as CMOS type 1: PC(4PINS) work as Open-drain type 0: PD(4PINS) work as CMOS type 1: PD(4PINS) work as Open-drain type
* P2, P7, P9: P279TP REG: (ADDRESS = 00DH) (Default data = 0H)
b3 b2 b1 b0 0: P2(4PINS) work as CMOS type 1: P2(4PINS) work as Open-drain type 0: P7(4PINS) work as CMOS type 1: P7(4PINS) work as Open-drain type 0: P9(4PINS) work as CMOS type 1: P9(4PINS) work as Open-drain type 0: PC.3 work as normal I/O port (CMOS type) 1: PC.3 work as 32.768 KHz output buffer (Open-drain Type)
6.6 Serial Port
The W921E880A/W921C880 has a clock-synchronous serial interface which transmits or receives 8bit data as default. The user can program the P6IO register to select port P6 as the serial port. The serial transmitter/receiver function can be operated with a multi-nibble function where the LSB of every nibble is being transmitted/received first. The serial transmitted/received data is come from or stored in the serial buffer registers (address 050H to 14EH). The number of nibbles to be transmitted/received is decided by the serial MSB nibble register (SRMNR, address = 00AH) and the serial LSB nibble register (SRLNR, address = 009H). SRMNR register: (address = 00AH, default data = 0H)
b3 b2 b1 b0
SRLNR register: (address = 009H, default data = 2H)
b3 b2 b1 b0
The default data in the SRMNR and SRLNR registers are 0 and 2 respectively which means the default serial interface is used to transmit/receive 8-bit data serially. As soon as these two registers are programmed and the instructions such as SOP or SIP are executed, the serial transmitter/receiver multi-nibble function will be performed. The transmitted/received number will be Publication Release Date: July 1999 Revision A3
- 19 -
W921E880A/W921C880
automatically increased by one when each nibble is transmitted/received until the number is equal to the value in the SRLNR, SRMNR registers. Even if the HOLD instruction is executed, the SOP or SIP function will continue to execute until completion of the transmitter/receiver function. However, execution of the STOP instruction will stop all serial transmitter/receiver functions. Whether transceiver data will be latched on the rising or falling edge of the clock is determined by the serial clock inverter control register (SRINV, address = 00CH). Before the SOP or SIP instructions are executed the SRINV register must be set to the exact value. Once both the SRINV.3 and SRINV.2 are clear, the serial transceiver function will be forced to reset to initial status immediately. SRINV register: (address = 00CH, default data = 0H)
b3 b2 b1 b0 0: Serial data latch at WCLK/RCLK rising edge (normal high) 1: Serial data latch at WCLK/RCLK falling edge (normal low) 0: WCLK and RCLK pins work as the internal clock output pin 1: WCLK and RCLK pins work as the external clock input pin 0: RCLK and RDATA disable (H-Z) 1: RCLK and RDATA enable 0: WCLK and WDATA disable (H-Z) 1: WCLK and WDATA enable
The serial interface configuration is shown below:
To Port P6 Normal I/O Register P6.3 P6.2 P6.1 P6.0 Port P6 Pull-High Resisters VDD
WDATA WCLK SRINV.3 RDATA RCLK SRINV.2 SCLK P6IO.3 P6IO.2 P6IO.1 P6IO.0
P6PH
To Port P6
Clock Source and Latch Control Circuit
SDATA
Serial Clock Speed Control Circuit
f SYS
System Clock 1/4
High Speed Clock
Serial/Parallel I/O Buffer
Serial Buffer Registers
050H 14EH
- 20 -
W921E880A/W921C880
The internal serial clock can be controlled by the serial clock speed control register (SRSPC) is described as follows: SRSPC register: (address = 00BH, default data = 0H)
b3 b2 b1 b0 b3 b2 b1 b0 Input frequency 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 Reserved fsys/4 Hz fsys/8 Hz fsys/16 Hz fsys/32 Hz fsys/64 Hz fsys/128 Hz fsys/256 Hz fsys/512 Hz fsys/1024 Hz fsys/2048 Hz
Normally the WCLK or RCLK pin will remain in a high state and the serial data will be latched at the rising edge of the WCLK or RCLK signal, but the serial clock inverter control register (SRINV) will invert the above function. In this case the WCLK or RCLK pin will remain in a low state and the serial data will be latched at the falling edge of the the WCLK or RCLK signal. The transmitting serial clock can come from WCLK or RCLK depending upon which one is enabled. If the serial function is disabled, it will cause the relative pins to be in a high impedance state and it will not affect the contents of the serial buffer registers (start at address 050H).
6.7 DTMF Generator
One channel of the dual tone multi-frequency (DTMF) generator is in this chip. The exact frequency must be decided by the OSCCTR REG to get the exact DTMF generator. OSCCTR REG: (ADDRESS = 013H, Default data = 0H)
b3 Reserved.
b2
b1
b0 b2 0 0 0 0 1 1 b1 0 0 1 1 0 0 b0 0 1 0 1 0 1 Osc. Selection 400 KHz 800 KHz 2 MHz 4 MHz Reserved 3.58MHz
There are four bits in the DTMF REG; the functions are described in the following table
- 21 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
DTMF REG: (ADDRESS = 014H), (Default data = 0H)
b3 b2 b1 b0 X X X X 0 0 1 1 X0 X0 X1 X1 0 1 0 1 0 1 0 1 FUNCTION DESCRIPTION Col 1 ( 1209 Hz ) output Col 2 ( 1336 Hz ) output Col 3 ( 1477 Hz ) output Col 4 ( 1633 Hz ) output Row 1 ( 697 Hz ) output Row 2 ( 770 Hz ) output Row 3 ( 852 Hz ) output Row 4 ( 941 Hz ) output
XX XX XX XX
Note : X --- Don't care
The output of the ROW and COL is controlled by the R/C CONTROL REG. RCCTL REG: (ADDRESS = 015H) (Default data = 0H)
b3 b2 b1 b0 0: ROW frequency disable 1: ROW frequency enable 0: COL frequency disable 1: COL frequency enable 0: DTMF disable (H-Z) 1: DTMF enable
Reserved
The following table shows the DTMF keypad and its frequency.
C1 1 4 7 *
C2 2 5 8 0
C3 3 6 9 #
C4 A B C D R1 R2 R3 R4
KEY FREQUENCY R1 697 Hz R2 770 Hz R3 852 Hz R4 941 Hz C1 1209 Hz C2 1336 Hz C3 1477 Hz C4 1633 Hz
6.8 Beep Tone Generator
There are 4 kinds of frequency outputs from the BTG pin that operate as a beep tone generator. Control of the OSCCTR REG. (ADDR = 013H) and the BTGR REG. (ADDR = 03FH) will enable the BTG pin to output the special frequencies -- 2 KHz, 1 KHz, 630 Hz or 520 Hz.
- 22 -
W921E880A/W921C880
BTGR REG: ADDRESS = 03FH) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 1 1 b0 0 1 0 1 Output-Freq. 2 KHz 1 KHz 630 Hz 520 Hz
Reserved
0: Beep Tone Generator disable (Keep in High state) 1: Beep Tone Generator enable
If the Beep Tone Generator is disabled by setting the BTGR REG. bit3 to "0" or after a power on reset, the BTG output pin will remain in a high state.
6.9 8-bit D/A Converter
The content of 8-bit D/A converter is divided into D/A MSB data register (DAMSB) and D/A LSB data register (DALSB). The block diagram is shown below.
ANIMUX Register Vani
ANI3 ANI2 ANI1 ANI0
Vpos Vrang = 1.5 V or (2/3)VDD DACTL.2 COMPTR.1 Vneg
COMPTR.2
COMPTR.3
8bit D/A Converter
Vref P5.2/Vref P5.3/DAOUT
DAMSB 4-bit Register
DALSB 4-bit Register
u D/A Converter Control Register: DACTL register: (ADDRESS = 016H, Default data = 0H)
b3 b2 b1 b0 0: D/A converter stop 1: D/A converter start Reserved Reserved 0:Vrang = (2/3)VDD 1:Vrang = 1.5V
- 23 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
When the DACTL register bit0 is set by software, the 8-bit D/A converter starts converting. The only way to disable the D/A converter is to reset the bit0 of the DACTL register using the software control. The analog signal will be output to the P5.3 pin in this chip if the I/O port works as the D/A output pin. The power source of the D/A converter can be selected from the (2/3)VDD or 1.5V by programming the DACTL register bit2. u D/A Converter LSB Data Register DALSB register: (ADDRESS = 017H, Default data = 0H)
b3 b2 b1 b0
u D/A Converter MSB Data Register DAMSB register: (ADDRESS = 018H, Default data = 0H)
b3 b2 b1 b0
6.10 Comparator
There are 4-channel inputs to the comparator negative (can be programmed to positive) terminal, but only one channel will be active at a time. The control register is shown below. ANIMUX register: (ADDRESS = 019H, Default data = 0H)
b3 b2 b1 b0
b1 b0 00 01 10 11 Enable ANI0 ANI1 ANI2 ANI3
Reserved Reserved
COMPTR register: (ADDRESS = 01AH, Default data = 4H)
b3 b2 b1 b0 0: Compare stop 1: Compare start 0: Vneg = Vref; Vpos = Vani 1: Vneg = Vani; Vpos = Vref (Read Only) 0: Vpos voltage < Vneg voltage 1: Vpos voltage >= Vneg volatge 0: Vref = P5.2/Vref 1: Vref = P5.3/DAOUT
- 24 -
W921E880A/W921C880
When the COMPTR register bit0 is set by software, the comparator starts and the bit2 of the COMPTR register will be set to "1" initially. The comparing result will be stored in the bit2 of the COMPTR register and will keep this value until the bit0 of the COMPTR register is set again. The only way to disable the comparator is to reset the bit0 of the COMPTR register using the software control. The initial value of the COMPTR bit2 is "1", the falling edge of COMPTR bit2 will cause the comparator interrupt to become active if the enable flag of the comparator interrupt is set. The bit3 of the COMPTR register controls the source of Input voltage reference (Vref). The input reference voltage (Vref) comes from external pin (P5.2/Vref) or D/A converter analog signal output (P5.3/DAOUT).
6.11 Timer 0-3
There are four timers (TM0, TM1, TM2 and TM3) in this chip, and all are initialized at any time by writing data into the TM0, TM1, TM2 and TM3 Set Reg. TM0 can perform the following function: 1. 2-19 order divider 2. Auto-reload Timer 3. Watch-dog timer
High Speed Clock
TM0 Control Register
System Clock 1/4
fSYS
11-bit Prescaler
Interrupt Control Register
TM0 Interrupt Logic
fSYS0 fSYS1
fTM0
8 Order Divider Watch Dog Timer TM0 Set Register (8 bits) TM0 Control Logic
1/8
fSUB
5-bit Prescaler
Low Speed Clock
TM0 Low Speed Register
- 25 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
The format of the Timer 0 Control Register is described as follows: TM0CR REG: (ADDRESS = 020H) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 1 1 Reserved Reserved b0 0 1 0 1 Input frequency (fsys0) fsys/2 fsys/256 fsys/1024 fsys/2048 Hz Hz Hz Hz
The format of the Timer 0 Low Speed Register is described as follows: TM0LSR REG: (ADDRESS = 024H) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 Reserved Reserved 1 1 b0 0 1 0 1 Input frequency (fsys1) fsub/2 fsub/8 fsub/16 fsub/32 Hz Hz Hz Hz
The Timer 0 Set REG. is divided into TIMER 0 MSB DATA REG.(TM0MSB REG, ADDRESS = 021H, Default = 0FH) and TIMER 0 LSB DATA REG.(TM0LSB REG, ADDRESS = 022H, Default = 0FH). Timer 0 will underflow when Timer 0 Set REG. goes from 00H to 0FFH. The value in the TM0MSB and TM0LSB will be auto reloaded to the Timer 0 Set REG. when the STTM0 bit2 is set. Timer 0 will decrease by 1 continuously during each clock transition after the timer has started. At any time, if the STTM0 bit3 goes from 0 to 1 (disable to enable) in the timer mode, the TM0MSB and TM0LSB will be auto reloaded to the Timer 0 Set Reg. again and the Timer 0 is restarted. Timer 0 will stop operating while the STTM0 bit3 is reset to 0. The Timer 0 starts to count when the STTM0 REG. bit3 is set. When Timer 0 underflows, the STTM0 bit3 will be reset by hardware to stop Timer 0 if the auto-reload is disabled, but the STTM0 bit3 will not be reset if the auto-reload is enabled. When the Timer 0 function is performed, the watch-dog timer function will be disabled automatically.
- 26 -
W921E880A/W921C880
The format of the Status of Timer 0 Register is shown as follows: STTM0 REG: (ADDRESS = 023H) (Default data = 0H)
b3 b2 b1 b0 0:Timer 0 normal function select 1:Watch-dog timer select 0:WDT not underflow 1:WDT underflow 0:Timer 0 auto-reload disable 1:Timer 0 auto-reload enable 0:Timer 0 stop 1:Timer 0 start
If Timer 0 works as a Watch Dog Timer, then bit1 of the STTM0 REG will be set when WDT underflows. Meanwhile, the system is reset just as in a power on reset except for the STTM0 bit1. The WDT (STTM0 bit1) will only be reset to zero during a power on reset or during the RAM write mode. In the timer mode or event counter mode a time out will be the programming data subtract 1 ([TM0MSB,TM0LSB]-1). It is the same for timers TM1, TM2 and TM3. TM1 can perform the following functions: 1. 2-19 order divider 2. Auto-reload timer. 3. Arbitrary waveform generator. 4. Event counter.
System Clock 1/4
f SYS
11-bit Prescaler
f TM1
TM1 Read Register
Interrupt Control Register
High Speed Clock
TM1 Control Register 2
8 Order Divider
TM1 Interrupt Logic
Port 5.0
Event Counter Logic
TM1 Set Register (8 bits)
Arbitrary Waveform Generator
TM1 Control Logic
- 27 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
The format of the Timer 1 Control Register is shown as follows: TM1CR REG: (ADDRESS = 025H) (Default data = 0H)
b3 b2 b1 b0 b3 b2 b1 b0 Input frequency (fsys0) 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 fsys/2 fsys/4 fsys/8 fsys/16 fsys/32 fsys/64 fsys/128 fsys/256 fsys/512 fsys/1024 fsys/2048 Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz
The Timer 1 Set REG. is divided into TIMER 1 MSB DATA REG.(TM1MSB REG, ADDRESS = 026H, Default = 0FH) and TIMER 1 LSB DATA REG. (TM1LSB REG, ADDRESS = 027H, Default = 0FH). The Timer 1 READ REG. is divided into TIMER 1 READ ONLY MSB DATA REG. (TM1RM REG, ADDRESS = 01CH, Default = 0FH) and TIMER 1 READ ONLY LSB DATA REG. (TM1RL REG, ADDRESS = 01DH, Default = 0FH). The format of the Status of Timer 1 Register is shown as follows: STTM1 REG: (ADDRESS = 028H) (Default data = 0H)
b3 b2 b1 b0 0: Timer 1 normal function select 1: Special function select Reserved 0:Timer 1 auto-reload disable 1:Timer 1 auto-reload enable 0:Timer 1 stop 1:Timer 1 start
If Timer 1 is in the timer mode, the Timer 1 will underflow when it goes from 00H to 0FFH. The value in the TM1MSB and TM1LSB will be auto reloaded to the Timer 1 Set REG. when the STTM1 bit2 is set. Timer 1 will decrease by 1 continuously at each clock transition after the timer has started. At any time the STTM1 bit3 goes from 0 to 1 (disable to enable), the TM1MSB and TM1LSB will be auto reloaded to the Timer 1 Set Reg. again and Timer 1 is restarted. Timer 1 will stop operating while the STTM1 bit3 is reset to 0.
- 28 -
W921E880A/W921C880
The Timer 1 starts to count when the STTM1 REG. bit3 is set. When Timer 1 underflows, the STTM1 bit3 will be reset by hardware to stop Timer 1 if the auto-reload is disabled, but the STTM1 bit3 will not be reset if the auto-reload is enabled. When the Timer 1 function is performed, the special function will be disabled automatically. The special function input or output is from or to P5.0. The format of the Timer 1 event counter condition is shown as follows TGTM1 REG: (ADDRESS = 029H) (Default data = 0H)
b3 b2 b1 b0 0: Event counter is falling edge trigger Reserved 1: Event counter is rising edge trigger 0: Special function work as event counter 1: Special function work as arbitrary waveform generator 0: Arbitrary waveform type 0 1: Arbitrary waveform type 1
TM2 can perform the following functions: 1. 2-19 order divider 2. Auto-reload timer. 3. Arbitrary waveform generator. 4. Pulse/Period width measurement function
System Clock 1/4
f SYS
11-bit Prescaler
f TM2
TM2 Read Register
Interrupt Control Register
High Speed Clock TM2 Control Register 8 Order Divider
TM2 Interrupt Logic
Port 5.1
Period/Pulse Width Measurement TM2 Set Register (8 bits)
Arbitrary Waveform Generator
TM2 Control Logic
- 29 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
TM2CR REG: (ADDRESS = 02AH) (Default data = 0H)
b3 b2 b1 b0 b3 b2 b1 b0 Input frequency (fTM2) 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 fsys/2 fsys/4 fsys/8 fsys/16 fsys/32 fsys/64 fsys/128 fsys/256 fsys/512 fsys/1024 fsys/2048 Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz
The Timer 2 Set REG. is divided into TIMER 2 MSB DATA REG. (TM2MSB REG, ADDRESS = 02BH, Default = 0FH) and TIMER 2 LSB DATA REG. (TM2LSB REG, ADDRESS = 02CH, Default = 0FH). The Timer 2 READ REG. is divided into TIMER 2 READ ONLY MSB DATA REG. (TM2RM REG, ADDRESS = 01EH, Default = 0FH) and TIMER 2 READ ONLY LSB DATA REG. (TM2RL REG, ADDRESS = 01FH, Default = 0FH). The format of the Status of Timer 2 Register is shown as follows: STTM2 REG: (ADDRESS = 02DH) (Default data = 0H)
b3 b2 b1 b0 0: Timer 2 mormal function select 1: Special function select Reserved
0:Timer 2 auto-reload disable 1:Timer 2 auto-reload enable 0:Timer 2 stop 1:Timer 2 start
If Timer 2 is in the timer mode, the Timer 2 will underflow when it goes from 00H to FFH. The value in TM2MSB and TM2LSB will be auto reloaded to the Timer 2 Set REG. Timer 2 will decrease by 1 continuously at each clock transition after the timer has started. At any time the STTM2 bit3 goes from 0 to 1 (disable to enable), TM2MSB and TM2LSB will be auto reloaded to the Timer 2 Set Reg. again and the Timer 2 is restarted. Timer 2 will stop operating when the STTM2 bit3 is reset to 0. - 30 -
W921E880A/W921C880
Timer 2 starts to count when the STTM2 REG. bit3 is set. When Timer 2 underflows, the STTM2 bit3 will be reset by hardware to stop Timer 2 if the auto-reload is disabled, but the STTM2 bit3 will not be reset if the auto-reload is enabled. When the Timer 2 function is performed, the special function is automatically disabled. The format of the trigger condition of the Timer 2 Register is shown as follows: TGTM2 REG: (ADDRESS = 02EH) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 1 1 b0 0 1 0 1 Trigger ----Rising Falling Both
0: Special function work as pulse/period width measurement 1: Special function work as arbitrary waveform generator 0: Arbitrary waveform type 0 1: Arbitrary waveform type 1
In pulse/period width measurement mode, the measuring-data is the 1'S complement of the exact data and the TM2 interrupt flag is set at every 255 timer clock occurences or if the 2nd trigger condition occurs. So the measured pulse/period width is (255(N - 1) + TM2) * T , where N is the
b3 b2 b1 b0 0: ROW frequency disable 1: ROW frequency enable 0: COL frequency disable 1: COL frequency enable 0: DTMF disable (H-Z) 1: DTMF enable
number of interrupt flag occurences, is the 1'S complement of timer2 register, and T is the period of the timer 2 clock. The special function input or output is from or to P5.1.
Reserved
TM3 can perform the following functions: 1. 2-19 order divider 2. Auto-reload timer.
Interrupt Control Register System Clock 1/4
fSYS
11-bit Prescaler
fTM3
8 Order Divider
TM3 Interrupt Logic
High Speed Clock
TM3 Control Register
TM3 Set Register (8 bits)
TM3 Control Logic
- 31 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
TM3CR REG: (ADDRESS = 02FH) (Default data = 0H)
b3 b2 b1 b0 b3 b2 b1 b0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0
Input frequency (fTM3)
fsys/2 fsys/4 fsys/8 fsys/16 fsys/32 fsys/64 fsys/128 fsys/256 fsys/512 fsys/1024 fsys/2048
Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz Hz
The Timer 3 Set REG. is divided into TIMER 3 MSB DATA REG. (TM3MSB REG, ADDRESS = 030H, Default = 0FH) and TIMER 3 LSB DATA REG. (TM3LSB REG, ADDRESS = 031H, Default = 0FH). The format of the Status of Timer 3 Register is shown as follows: STTM3 REG: (ADDRESS = 032H) (Default data = 0H)
b3 b2 b1 b0 Reserved Reserved
0:Timer 3 auto_reload disable 1:Timer 3 auto-reload enable 0:Timer 3 stop 1:Timer 3 start
6.11.1 Arbitrary Waveform Generator Both TM1 and TM2 have arbitrary waveform generator circuits. The following description describes their opeation.
TYPE 0 :
NT
256T N = 0 Will keep the waveform in the high state.
TYPE 1 :
T
NT N = 1 Will keep the waveform in the low state.
Note: N is the value stored in the TM1 Set Reg. (TM1MSB, TM1LSB) or TM2 Set Reg. (TM2MSB, TM2LSB)
- 32 -
W921E880A/W921C880
6.12 Interrupt
There are 10 interrupt sources. There are four external sources: INT0 (P4.3) and P4 Port (P4.0-P4.2), triggered by the falling edge signals of external sources, and six internal sources: Timer0, Timer1, Timer2, Timer3, Comparator and Serial Port. The priority of those interrupts is INT0 > TM0 > TM1 > TM2 > ( Comparator / TM3 ) > P4.0 to P4.2 > SERIAL. 6.12.1 Interrupt Control Register The INTERRUPT CONTROL REG.1-3 (INTCT1-INTCT3) controls which interrupt is enabled. The formats are shown below: INTCT1 REG: (ADDRESS = 039H) (Default data = 0H)
b3 b2 b1 b0 0: TM0 interrupt disable 1: TM0 interrupt enable 0: TM1 interrupt disable 1: TM1 interrupt enable 0: TM2 interrupt disable 1: TM2 interrupt enable 0: TM3 interrupt disable 1: TM3 interrupt enable
INTCT2 REG: (ADDRESS = 03AH) (Default data = 0H)
b3 b2 b1 b0 0: INT0 pin interrupt disable 1: INT0 pin interrupt enable 0: SERIAL interrupt disable 1: SERIAL interrupt enable Reserved 0: COMPARATOR interrupt disable 1: COMPARATOR interrupt enable
INTCT3 REG: (ADDRESS = 03BH) (Default data = 0H)
b3 b2 b1 b0 0: P4.0 PORT interrupt disable 1: P4.0 PORT interrupt enable 0: P4.1 PORT interrupt disable 1: P4.1 PORT interrupt enable Reserved 0: P4.2 PORT interrupt disable 1: P4.2 PORT interrupt enable
- 33 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
6.12.2 Interrupt Enable Flag When the interrupt is enabled by an event, the program counter will jump to the interrupt address and the Enable InterruptT Flag (ENINT) bit0 is cleared. All the interrupts will also be disabled at the same time. The only method to enable the interrupt again is to set the ENINT bit0 or to execute the RTNI instruction. ENINT REG: (ADDRESS = 034H) (Default data = 0H)
b3 b2 b1 b0 0: Disable all interrupt 1: Enable all interrupt Reserved Reserved
Reserved
When the interrupt is enabled by an event, the individual interrupt request signal is automatically cleared by the hardware with the other interrupt request signals kept in the same condition. The only way to reset the interrupt request signal is to execute the instruction CLR EVF, #I (I is a 8bits data, for example, CLR EVF, #00000001b instruction implies to clear TM0 interrupt request signal). This instruction is a 2 word / 2 cycle instruction; the format of the immediate data is shown as follows:
i7 i6 i5 i4 i3 i2 i1 i0 1: TM0 int. request signal is cleared 1: TM1 int. request signal is cleared 1: TM2 int. request signal is cleared 1: TM3 int. request signal is cleared 1: INT0 int. request signal is cleared 1: SERIAL int. request signal is cleared 1: COMPARATOR int. request signal is cleared 1: P4 int. request signal is cleared
6.13 Operating Mode
There are 3 types of operating mode, Normal Mode , Hold Mode, and Stop Mode. 6.13.1 Normal Mode All functions operate with the P functioning according to the system clock. 6.13.2 Hold Mode The P enters the HOLD MODE when the HOLD instruction is executed from NORMAL MODE. In this mode, the system clock is stopped, so the program counter (PC) will also stop. But the oscillator, timer/ counter, serial port and interrupt active pins continue to function. The HOLD MODE can be released only by the RESET pin or by an interrupt request signal. When the hold mode is released, either the hold mode is released only, or the hold mode is released and the interrupt subroutine (interrupt vector) is serviced. The HOLD MODE RELEASES FLAG 1, 2, 3 (HMRF1, 2, 3) (ADDRESS = 036H, 037H, 038H) which can control the flow. The formats of these three flags are shown below. - 34 -
W921E880A/W921C880
HMRF1 REG: (ADDRESS = 036H) (Default data = 0H)
ANI3 ANI2 ANI1 ANI0 ANIMUX Register Vani
Vpos Vrang = 1.5 V or (2/3)V DACTL.2
DD
COMPTR.2
COMPTR.1 Vneg COMPTR.3
8bit D/A Converter
Vref P5.2/Vref P5.3/DAOUT
DAMSB 4-bit Register
DALSB 4-bit Register
HMRF2 REG: (ADDRESS = 037H) (Default data = 0H)
b3 b2 b1 b0 b1 0 0 1 1 b0 0 1 0 1 Trigger ----Rising Falling Both
0: Special function work as pulse/period width measurement 1: Special function work as arbitrary waveform generator 0: Arbitrary waveform type 0 1: Arbitrary waveform type 1
HMRF3 REG: (ADDRESS = 038H) (Default data = 0H)
b3 b2 b1 b0 0: P4.0 PORT hold released disable 1: P4.0 PORT hold released enable 0: P4.1 PORT hold released disable 1: P4.1 PORT hold released enable Reserved 0: P4.2 PORT hold released disable 1: P4.2 PORT hold released enable
The HOLD RELEASED STATUS FLAG 1, 2, 3 (HRSTS1, 2, 3) (ADDRESS = 03CH, 03DH, 03EH) stores the information that caused the HOLD MODE to be released. The format is shown below.
- 35 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
HRSTS1 REG: (ADDRESS = 03CH) (Read Only) (Default data = 0H)
b3 b2 b1 b0 1: HOLD has released by TM0 1: HOLD has released by TM1 1: HOLD has released by TM2 1: HOLD has released by TM3
HRSTS2 REG: (ADDRESS = 03DH) (Read Only) (Default data = 0H)
b3 b2 b1 b0 1: HOLD has released by the INT0 pin 1: HOLD has released by SERIAL Port Reserved 1: HOLD has released by COMPARATOR
HRSTS3 REG: (ADDRESS = 03EH) (Read Only) (Default data = 0H)
b3 b2 b1 b0 1: HOLD has released by P4.0 1: HOLD has released by P4.1 Reserved 1: HOLD has released by P4.2
HRSTS1, 2, and 3 are read only registers and cleared by the instruction CLR EVF #I.
- 36 -
W921E880A/W921C880
Hold Mode Operation Flow Chart
TM0 to TM3 Serial; Comparator; Falling change occurs at INT0, P4.0-P4.2
Yes
In HOLD Mode ?
No
INTCT Interrupt Flag Set? Yes
No
INTCT Interrupt Flag Set? Yes
No
Reset ENINT Flag and individual Request Flag Execute Interrupt Service Routine
No
HMRF Hold Release Flag Set? Yes
Reset ENINT Flag and individual Request Flag Execute Interrupt Service Routine
HOLD
PC <- (PC+1)
6.13.3 Stop Mode The P enters the STOP MODE only if the stop instruction is executed. All chip functions are disabled because both of the oscillators are stopped. The stop mode can be released by the low level of the RESET pin, INT0 pin, P4 port, PA port or PB port. The STOP CONDITION RELEASE FLAG (STPRF ADDRESSS = 035H) is the STOP mode release control reg. STPRF REG.: (ADDRESS = 035H) (Default data = 8H)
b3 b2 b1 b0 0: Stop released by any pin of PA is disable 1: Stop released by any pin of PA is enable 0: Stop released by any pin of PB is disable 1: Stop released by any pin of PB is enable 0: Stop released by any pin of P4.0-P4.2 is disable 1: Stop released by any pin of P4.0-P4.2 is enable 0: Stop released by INT0 (P4.3) is disable 1: Stop released by INT0 (P4.3) is enable
- 37 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
When the STOP CONDITION RELEASE FLAG (STPRF) and the INTERRUPT CONTROL REG. (INTCT1-INTCT3) are set before the STOP instruction is executed, a low level signal on the P4, PA or PB ports will cause the STOP MODE to be released. There will be a delay of about 256 machine cycles after the stop mode is released. The interrupt subroutine (interrupt vector) is then executed according to the set bit in the STPRF REG. If the interrupt enable flag is not set before the STOP instruction is executed, then the next instruction after the STOP instruction will be executed. It also has a delay of about 256 machine cycles before the next instruction is executed. It should be noted that if STOP MODE is released by the PA or PB port, then the chip will execute the (PC+1) instruction only because there is no individual interrupt subroutine in the PA and PB ports. The control flow chart is shown as follows: Stop Mode Operation Flow Chart
START Enter STOP Mode PC STOP No
STOP Release
Yes System will Delay 256 Machine Cycle Automatically (Only falling signal on INT0 or P4.0 - P4.2)
Yes INT Enable? No (PA, PB Ports on low level state) PC + 1 Next Instruction
INT Vector
RTNI
- 38 -
W921E880A/W921C880
6.14 Initial Condition Register of EPROM Program Method
There is one 4-bit of the initial condition register (not part of the RAM) in W921E880A to control the micro-controller initial status after power-on. The format is described as following: INI register: (initial value = 0FH)
b3 b2 b1 b0 0: f osc acts as RC oscillator type 1: f osc acts as crystal type 0: f1 = f L , f2 = f 1: f1 = f H, f2 = f Reserved Reserved
H L
6.15 Reset
1. Reset by RESET RESET
256 machine cycle Program executed from address 000H
Reset all control reg.
As RESET pin is pulled low, system and all control registers are reset to initial state. After RESET pin is in high level, system will delay 256 machine cycle time then program is executed from address 000H. 2. Reset by Watch Dog Timer
STTM0.1
256 machine cycle Reset all control regs except STTM0.1.
Program executed from address 000H
As watch dog timer underflows, the STTM0.1 is set, in the mean while, system and all control registers, except data 1 in STTM0.1 bit is reserved, are reset to initial state then after a delay of 256 machine cycle time program is executed from address 000H. After system reset, user can detect STTM0.1 to recognize which method of reset was done before.
- 39 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
7. ADDRESSING MODE
7.1 ROM Addressing Mode
There are two ROM addressing modes in this chip * Indirect Call Addressing Mode (0H-0FFFH) * Long Call/Jump Addressing Mode (0H-1FFFH) Indirect Call Addressing Mode (1 Word/2 Cycles)
ROM CODE b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b3 b2 b1 b0 b3 b2 b1 b0
decoder code
i3 i2 i1 i0
B Register
A Register
PC
b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 0 i3 i2 i1 i0 b3 b2 b1 b0 a3 a2 a1 a0
Instruction: CALLP Long Call/Jump Addressing Mode (2 Words/2 Cycles)
ROM CODE b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
decoder code
PC
b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Instruction: CALL, JMPL, JB0, JB1, JB2, JB3, JC, JNC, JZ, JNZ
7.2 RAM Addressing Mode
There are three RAM addressing modes. * Direct Addressing Mode * Indirect Addressing Mode * Working Register Addressing Mode
- 40 -
W921E880A/W921C880
Direct Addressing Mode (2 Words/2 Cycles)
ROM CODE b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
decoder code
RAM ADDRESS
b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Instruction: MOV A, Mx; MOV B, Mx; MOV Mx, A; MOV Mx, B; ..., etc.
Indirect Addressing Mode (1 Word/1 Cycle)
W Register b1 b0 V Register b3 b2 b1 b0 U Register b3 b2 b1 b0
RAM ADDRESS
b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Instruction: MOV A, @M; MOV B, @M; MOV @M, A; ..., etc.
Working REG Addressing Mode (1 Word/1 Cycle)
ROM CODE b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
decoder code
RAM ADDRESS
0 0 0 1 0 0 m3 m2 m1 m0
Instruction: MOV A, WRn; MOV WRn, A; ..., etc.
- 41 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
7.3 Look-up Table Addressing Mode (1 Word/2 Cycles)
There is one special function look-up table addressing mode in this chip; the instruction is TBL I and the function is shown in the following table.
ROM CODE b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 I3 to I0 decoder code 0 ROM ADDRESS (0 to 4K) b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 b3 b2 b1 b0 B register b3 b2 b1 b0 A register
ROM CODE
b9 b8
b7 b6 b5 b4
b3 b2 b1 b0
XY
b3 b2 b1 b0 OP2
b3 b2 b1 b0 OP1
ROM Code Output to Register or Port X 0 0 1 1 Y 0 1 0 1 OP2 Disable B register Port P2 Both OP1 Disable A register Port P1 Both
Example:
. . .
MOV MOV TBL
. . .
A, #03H B, #01H 02H
; A = 0CH, B = Port2 = 0DH
ORG DC
. . .
213H 3DCH
- 42 -
W921E880A/W921C880
8. SPECIAL CONTROL REG. FORMAT
ADDR. 000H 001H 002H 003H 004H 005H 006H 007H 008H 009H 00AH 00BH 00CH 00DH 00EH 00FH 010H 011H 012H 013H 014H 015H 016H 017H 018H 019H 01AH 01BH 01CH 01DH 01EH 01FH 020H 021H DESCRIPTION System Clock Control Register Bank Select Register Reserved Port P4 Pull High Resistor Register Port P4 Output Type Register Port P6 Pull High Resistor Register Port P6 Output Type Register Port PABCD Pull High Resistor Register Port PABCD Output Type Register Serial LSB Nibble Register Serial MSB Nibble Register Serial Speed Control Register Serial Clock Inverter Control Register Port P2 Output Type Register Reserved Port P3 I/O Status Control Register Port P4 I/O Status Control Register Port P5 I/O Status Control Register Port P6 I/O Status Control Register DTMF Oscillation Control Register DTMF Register Row/Column Frequency Control Register D/A Control Register D/A Converter LSB Data Register D/A Converter MSB Data Register Comparator Analog Input Multiplexer Comparator Control Register Reserved TM1 Read Only MSB Data Register TM1 Read Only LSB Data Register TM2 Read Only MSB Data Register TM2 Read Only LSB Data Register TM0 Control Register TM0 MSB Data Register (TM1RM) (TM1RL) (TM2RM) (TM2LM) (TM0CR) (TM0MSB) ( P3IO ) ( P4IO ) ( P5IO ) ( P6IO ) (OSCCTR) (DTMF) (RCCTL) (DACTL) (DALSB) (DAMSB) (ANIMUX) (COMPTR) ABBREVIATION (SYSCCR) (BKSR) (P4PH) (P4TP) (P6PH) (P6TP) (PABCDPH) (PABCDTP) (SRLNR) (SRMNR) (SRSPC) (SRINV) (P2TP) INITIAL VALUE 00H 02H 00H 00H 00H 00H 00H 00H 02H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H 04H 0FH 0FH 0FH 0FH 00H 0FH
- 43 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
8. Special Control REG. Format, continued
ADDR. 022H 023H 024H 025H 026H 027H 028H 029H 02AH 02BH 02CH 02DH 02EH 02FH 030H 031H 032H 033H 034H 035H 036H 037H 038H 039H 03AH 03BH 03CH 03DH 03EH 03FH
DESCRIPTION TM0 LSB Data Register TM0 Status Register Reserved or Timer 0 Low Speed Register TM1 Control Register TM1 MSB Data Register TM1 LSB Data Register TM1 Status Register TM1 Trigger Condition Register TM2 Control Register TM2 MSB Data Register TM2 LSB Data Register TM2 Status Register TM2 Trigger Condition Register TM3 Control Register TM3 MSB Data Register TM3 LSB Data Register TM3 Status Register Reserved Interrupt Enable Flag Stop Mode Released Flag Hold Mode Released Flag 1 Hold Mode Released Flag 2 Hold Mode Released Flag 3 Interrupt Control Register 1 Interrupt Control Register 2 Interrupt Control Register 3 Hold Released Status Flag 1 Hold Released Status Flag 2 Hold Released Status Flag 3 Beep Tone Generator Register
ABBREVIATION (TM0LSB) (STTM0) (TM0LSR) (TM1CR) (TM1MSB) (TM1LSB) (STTM1) (TGTM1) (TM2CR) (TM2MSB) (TM2LSB) (STTM2) (TGTM2) (TM3CR) (TM3MSB) (TM3LSB) (STTM3) (ENINT) (STPRF) (HMRF1) (HMRF2) (HMRF3) (INTCT1) (INTCT2) (INTCT3) (HRSTS1) (HRSTS2) (HRSTS3) (BTGR)
INITIAL VALUE 0FH 00H 00H 00H 0FH 0FH 00H 00H 00H 0FH 0FH 00H 00H 00H 0FH 0FH 00H 00H 08H 00H 00H 00H 00H 00H 00H 00H 00H 00H 00H
- 44 -
W921E880A/W921C880
9. INSTRUCTION MAP
b9 = 0 b8 = 0
LSB MSB
0
NOP
MOV B, A
1
2
3
4
MOV A,W
5
MOV A, V
6
MOV A, U
7
8
SRL A SRH A
9
INC B INC DP
0A 0B 0C 0D 0E 0F
ADD A, Mx ADD A, @M
0 1 2 3 4 5 6 7 8 9 0A 0B 0C 0D 0E 0F
MOV A, B MOV A, Mx MOV A, @M
CLRB Mx, bit CLRB @M, bit SETB Mx, bit SETB @M, bit
CLR EVF XCH A, B MOV DP, #I SOP
MOV B, Mx MOV B, @M
ADC A, Mx ADC A, @M
MOV Mx, A
MOV Mx, B
SLL A
DEC B
SUB A, Mx
SUB A, @M
MOV @M, A MOV @M, B
SLH A
DEC DP
SBC A, Mx
SBC A, @M
MOV W, A
RRC A
ANL A, Mx
ANL A, @M
MOV V, A
ORL A, Mx
ORL A, @M
SIP
MOV U, A
RLC A
XRL A,B
XRL A,Mx
XRL A,@M
SET CF
XCH V.CV
HOLD
RTN
CMP A,B
CMP A,MX
CMP A,@M CLR CF
XCH U,CU
STOP
RTNI
ADD A, #I ADC A, #I SUB A, #I SBC A, #I ANL A, #I ORL A, #I XRL A, #I CMP A, #I
1W/1C 2W/2C Undecided
1W/2C 2W/3C
1W/3C 3W/3C
- 45 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
b9 = 1 b8 = 0
LSB MSB
0
1
2
3
4
5
6
7
8
9
0A 0B 0C 0D 0E 0F
0 1 2 3 4 5 6 7 8 9 0A 0B 0C 0D 0E 0F
MOV PMx, #I
JB0 JB2 JC JZ JMPL CALLP TBL
JB1 JB3 JNC JNZ CALL
1W/1C 2W/2C Undecided
1W/2C 2W/3C
1W/3C 3W/3C
- 46 -
W921E880A/W921C880
b9 = 1 b8 = 1
LSB MSB
0
1
2
3
4
5
6
7
8
9
0A 0B 0C 0D 0E 0F
0 1 2 3 4 5 6 7 8 9 0A 0B 0C 0D 0E 0F
MOV A, #I MOV B, #I MOV Mx, #I MOV @M, #I ADD A, WRn SUB A, WRn ANL A, WRn XRL A, WRn MOV A, WRn MOV A, Px MOV B, WRn MOV B, Px MOV WRn, A MOV Px, A MOV WRn, B MOV Px, B ADC A, WRn SBC A, WRn ORL A, WRn CMP A, WRn
1W/1C 2W/2C Undecided
1W/2C 2W/3C
1W/3C 3W/3C
- 47 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
10. INSTRUCTION SETS
MACHINE CODE Arithmetic 00 0000 1010, xxxxxxxxxx 11 0100 0 i i i 00 0000 1011 00 0001 1010, xxxxxxxxxx 11 0100 1 i i i 00 0001 1011 00 0010 1010, xxxxxxxxxx 11 0101 0 i i i 00 0010 1011 00 0011 1010, xxxxxxxxxx 11 0101 1 i i i 00 0011 1011 00 1000 i i i i 00 1001 i i i i 00 1010 i i i i 00 1011 i i i i 00 1010 0001 00 0010 1001 00 0011 1001 00 1000 0001 00 0000 1001 00 0001 1001 Logic 00 0100 1010, xxxxxxxxxx 11 0110 0 i i i 00 0100 1011 00 0101 1010, xxxxxxxxxx 11 0110 1 i i i 00 0101 1011 00 0110 1010, xxxxxxxxxx 11 0111 0 i i i 00 0110 1011 00 0111 1010, xxxxxxxxxx 11 0111 1 i i i ANL A, Mx ANL A, WRx ANL A, @M ORL A, Mx ORL A, WRx ORL A, @M XRL A, Mx XRL A, WRx XRL A, @M CMP A, Mx CMP A, WRx A ^ Mx A A ^ WRx A A ^ @M A A Mx A A WRx A A @M A A Mx A A WRx A A @M A A - Mx A - WRx A A A A A A A A A U VW U VW U VW Z Z Z Z Z Z Z Z Z Z, C Z, C 2/2 1/1 1/1 2/2 1/1 1/1 2/2 1/1 1/1 2/2 1/1 x = 0 -- 7 x = 0 -- 7 x = 0 -- 7 x = 0 -- 7 ADD A, Mx ADD A, WRx ADD A, @M ADC A, Mx ADC A, WRx ADC A,@M SUB A, Mx SUB A, WRx SUB A, @M SBC A, Mx SBC A, WRx SBC A, @M ADD A, #I ADC A, #I SUB A, #I SBC A, #I DEC A DEC B DEC DP INC A INC B INC DP A + Mx A A + WRx A A + @M A A + Mx + C A A + WRx + C A A+ @M + C A A - Mx A A - WRx A A - @M A A - Mx - C A A - WRx - C A A - @M - C A A+IA A + I +C A A-IA A-I-CA A-1A B-1B DP - 1 DP A + 1 A B+1B DP + 1 DP A B U VW A A A A A A A A A A A A A A A A A B U VW U VW U VW U VW U VW Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z, C Z. C Z, C Z, C Z, C Z, C C Z, C Z, C C 2/2 1/1 1/1 2/2 1/1 1/1 2/2 1/1 1/1 2/2 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 ADD A, #1 SUB A, #1 x = 0 -- 7 x = 0 -- 7 x = 0 -- 7 x = 0 -- 7 MNEMONIC FUNCTION A B U V W STATUS W/C MEMO
- 48 -
W921E880A/W921C880
10. Instruction set, continued MACHINE CODE 00 0111 1011 00 0110 1001 00 0111 1001 00 1100 i i i i 00 1101 i i i i 00 1110 i i i i 00 1111 i i i i 00 1110 1111 Move 00 0000 0001 00 0000 0010, xxxxxxxxxx 00 0000 0011 00 0000 0100 00 0000 0101 00 0000 0110 00 0001 0000 00 0010 0000, xxxxxxxxxx 00 0011 0000 00 0100 0000 00 0101 0000 00 0110 0000 00 0001 0010, xxxxxxxxxx 00 0001 0011 00 0010 0001, xxxxxxxxxx 00 0011 0001 11 0000 i i i i 11 0001 i i i i 11 0010 i i i i, xxxxxxxxxx 11 0011 i i i i 11 1000 nnnn 11 1001 xxxx 11 1010 nnnn 11 1011 xxxx 11 1100 nnnn 11 1101 nnnn 11 1110 xxxx MOV A, B MOV A, Mx MOV A, @M MOV A, W MOV A, V MOV A, U MOV B, A MOV Mx, A MOV @M, A MOV W, A MOV V, A MOV U, A MOV B, Mx MOV B, @M MOV Mx, B MOV @M,B MOV A, #I MOV B, #I MOV Mx, #I MOV @M, #I MOV A, WRn MOV A, Px MOV B, WRn MOV B, Px MOV WRn, A MOV Px, A MOV WRn, B BA Mx A @M A WA VA UA AB A Mx A @M AW AV AU Mx B @M B B Mx B @M IA IB I Mx I @M WRn A Px A WRn B Px B A WRn A Px B WRn A A B A A B B U VW A B A A A A A A A A A A A A B B B B U VW U VW U V U VW W B U V U VW W B Z Z Z Z Z Z ----------Z ---Z Z -----1/1 2/2 1/1 1/1 1/1 1/1 1/1 2/2 1/1 1/1 1/1 1/1 2/2 1/1 2/2 1/1 1/1 1/1 2/2 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 MNEMONIC CMP A, @M XRL A, B CMP A, B ANL A, #I ORL A, #I XRL A, #I CMP A, #I NOT A FUNCTION A - @M AB A A-B A^IA AI A AIA A-I NOT A A A A A A A A B U U B V W STATUS VW Z, C Z Z, C Z Z Z Z, C Z W/C 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 XRL A,#F MEMO
- 49 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
10. Instruction set, continued MACHINE CODE 11 1111 xxxx 10 0xxx i i i i SERIAL I/O 00 0100 1111 00 0101 1111 Rotate or Shift 00 0000 1000 00 0001 1000 00 0010 1000 00 0011 1000 00 0100 1000 00 0110 1000 Branch 10 1000 0aaa, aaaaaaaaaa 10 1000 1aaa, aaaaaaaaaa 10 1001 0aaa, aaaaaaaaaa 10 1001 1aaa, aaaaaaaaaa 10 1010 0aaa, aaaaaaaaaa 10 1010 1aaa, aaaaaaaaaa 10 1011 0aaa, aaaaaaaaaa 10 1011 1aaa, aaaaaaaaaa 10 1100 0aaa, aaaaaaaaaa 10 1100 1aaa, aaaaaaaaaa 10 1101 aaaa 10 1110 aaaa Other 00 0110 1111 00 0111 1111 00 0000 0000 00 0110 1110 00 0111 1110 00 0001 11bb RTN RTNI NOP HOLD STOP CLRB @M, bit Stack PC Stack PC, Z, C ---0 @M(b) U VW -Z,C ----1/3 1/3 1/1 1/1 1/1 1/1 ENINT active again JB0 addr JB1 addr JB2 addr JB3 addr JC addr JNC addr JZ addr JNZ addr JMPL addr CALL addr CALLP addr TBL addr Addr PC Addr PC Addr PC Addr PC Addr PC Addr PC Addr PC Addr PC Addr PC Addr PC @Addr PC -A A B B -----------Z 2/2 2/2 2/2 2/2 2/2 2/2 2/2 2/2 2/2 2/2 1/2 1/2 Indirect address call Look Up Table Long Jump SRL A SRH A SLL A SLH A RRC A RLC A AnAn-1, 0A3 AnAn-1, 1A3 AnAn+1, 0A0 AnAn+1, 1A0
AnAn-1,A0C,CA3 AnAn+1,A3C,CA0
MNEMONIC MOV Px, B MOV PMx, #I
FUNCTION B Px I PMx
A
B B
U
V W STATUS ---
W/C 1/1 1/1
MEMO
Mode of Port 0-7
SOP SIP
---
---
*1 *1
A A A A A A
Z Z Z Z Z, C Z, C
1/1 1/1 1/1 1/1 1/1 1/1
n = 3-1 n = 3-1 n = 0-2 n = 0-2 n = 3-1 n = 0-2
- 50 -
W921E880A/W921C880
10. Instruction set, continued MACHINE CODE 00 0000 11bb, xxxxxxxxxx 00 0011 11bb 00 0010 11bb, xxxxxxxxxx 00 0111 1100 11 0000 0000 00 0100 1100, 00i i i i i i i i 00 0110 1100 00 0100 1110, i i i i i i i i i i 00 0111 1101 00 0110 1101 00 0100 1101 Notes: *DP = {W reg , V reg , U reg} *@M = @{W, V, U} *@Addr = { I , Breg, Areg} to be a target address for the CALLP instruction *1: Depends on the SRMNR, SRLNR register MNEMONIC CLRB Mx, bit SETB @M, bit SETB Mx, bit CLR CF CLR A CLR EVF, #I SET CF MOV DP, #I XCH U, CU XCH V, CV XCH A, B FUNCTION 0 Mx(b) 1 @M(b) 1 Mx(b) 0C 0A -C=1 I DP U CU V CV AB A B U U V VW A U VW A B U V W STATUS ---C Z -C ---Z W/C 2/2 1/1 2/2 1/1 1/1 2/2 1/1 2/2 1/1 1/1 1/1 MOV A, #0 MEMO
11. ABSOLUTE MAXIMUM RATINGS
PARAMETER Supply Voltage to Ground Potential Applied input/output Voltage Power Dissipation Ambient Operating Temperature Storage Temperature
device.
RATING -0.3 to +7.0 -0.3 to +7.0 120 0 to +70 -55 to 150
UNIT V V mW C C
Note: Exposure to conditions beyond those listed under Absolute Maximum Ratings may adversely affect the life and reliability of the
- 51 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
12. ELECTRICAL CHARACTERISTICS
12.1 AC Characteristics
W921E880A EPROM Type
(VDD-VSS = 3.0V, FOSC = 4.0 MHz, TA = 25 C, unless otherwise specified)
PARAMETER Operating Frequency 1 Operating Frequency 2 Operating Frequency 3 Operating Frequency 4 Operating Frequency 5 Operating sub. system Instruction Cycle Time Serial Port Data Ready Time Serial Port Data Hold Time RESET Active Width ROW 1 Frequency (697Hz) ROW 2 Frequency (770 Hz) ROW 3 Frequency (852 Hz) ROW 4 Frequency (941 Hz) COL 1 Frequency (1209 Hz) COL 2 Frequency (1336 Hz) COL 3 Frequency (1477 Hz) COL 4 Frequency (1633 Hz) ROW 1 Frequency (697 Hz) ROW 2 Frequency (770 Hz) ROW 3 Frequency (852 Hz) ROW 4 Frequency (941 Hz) COL 1 Frequency (1209 Hz) COL 2 Frequency (1336 Hz) COL 3 Frequency (1477 Hz) COL 4 Frequency (1633 Hz) Oscillator Start Time
SYM. FOSC1 FOSC2 FOSC3 FOSC4 FOSC5 FSUB TI TDR TDH TRAW FROW1 FROW2 FROW3 FROW 4 FCOL1 FCOL2 FCOL3 FCOL4 FROW 1 FROW2 FROW3 FROW4 FCOL1 FCOL2 FCOL3 FCOL4 TOST
CONDITIONS OSCI, OSCO OSCI, OSCO OSCI, OSCO OSCI, OSCO OSCI, OSCO XT, XT One Machine Cycle ---FOSC = 4 MHz, 2 MHz 800 KHz, 400 KHz '' '' '' '' '' '' '' FOSC = 3.58 MHz '' '' '' '' '' '' '' OSCO, XT
MIN. -------200 200 2TI -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.92 -0.92 -0.92 -0.92 -0.92 -0.92 -0.92 -0.92 --
TYP. 400 800 2 3.58 4 32.768 4/FOSC -------------------17
MAX. ----------+0.5 +0.5 +0.5 +0.5 +0.5 +0.5 +0.5 +0.5 +0.92 +0.92 +0.92 +0.92 +0.92 +0.92 +0.92 +0.92 --
UNIT KHz KHz MHz MHz MHz KHz S nS nS TI % % % % % % % % % % % % % % % % mS
2
/FOSC
- 52 -
W921E880A/W921C880
W921C880 Mask ROM Type
(VDD-VSS = 3.0V, FOSC = 4.0 MHz, TA = 25 C, unless otherwise specified)
PARAMETER
SYM. FOSC1 FOSC2
CONDITIONS
MIN. - -
TYP. 400 800 2 3.58 4 32.768 4/FOSC - - - -
MAX. - - - - - - - - - - +0.5
UNIT KHz KHz MHz MHz MHz KHz S nS nS TI %
Operating Frequency
FOSC3 FOSC4 FOSC5
OSCI, OSCO
- - - - - 200 200 2 -0.5
Operating Sub-frequency Instruction Cycle Time Serial Port Data Ready Time Serial Port Data Hold Time
RESET Active Width
FSUB TI TDR TDH TRAW FROW1
XT, XT One Machine Cycle - - - FOSC = 4 MHz, 2 MHz, 800 KHz, 400 KHz FOSC = 3.58 MHz Same as ROW1 Same as ROW1 Same as ROW1 Same as ROW1 Same as ROW1 Same as ROW1 Same as ROW1
ROW 1 Frequency (697Hz)
-0.92 -0.5 -0.92 -0.5 -0.92 -0.5 -0.92 -0.5 -0.92 -0.5 -0.92 -0.5 -0.92 -0.5 -0.92 -
17
- - - - - - - - - - - - - - -
2 /FOSC
+0.92 +0.5 +0.92 +0.5 +0.92 +0.5 +0.92 +0.5 +0.92 +0.5 +0.92 +0.5 +0.92 +0.5 +0.92 - mS % % % % % % %
ROW 2 Frequency (770 Hz) ROW 3 Frequency (852 Hz) ROW 4 Frequency (941 Hz) COL 1 Frequency (1209 Hz) COL 2 Frequency (1336 Hz) COL 3 Frequency (1477 Hz) COL 4 Frequency (1633 Hz) Oscillator Start Time
FROW2 FROW3 FROW4 FCOL1 FCOL2 FCOL3 FCOL4 TOST
OSCO
- 53 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
12.2 DC Characteristics
W921E880A EPROM Type
(VDD-VSS = 3.0V, FOSC = 4.0 MHz, TA = 25 C, unless otherwise specified)
PARAMETER Operating Voltage Operating Current 1 (4 MHz) (Active mode) Operating Current 2 (4 MHz) (Active mode) Operating Current 3 (800 KHz) (Active mode) Operating Current 4 (800 KHz) (Active mode) Operating Current 5 (400 KHz) (Active mode) Operating Current 6 (400 KHz) (Active mode) Hold Mode Current 1 (4 MHz) Hold Mode Current 2 (800 KHz) Hold Mode Current 3 (400 KHz) Hold Mode Current 4 (32.768 KHz) Stop Mode Current 1 (4 MHz) Stop Mode Current 2 (800 KHz) Stop Mode Current 3 (400 KHz) Stop Mode Current 4 (32.768 KHz) Input High Voltage Input Low Voltage Pull-high Resistor (P2, P4, P6, P7, P9, PA, PB, PC, PD) Output High Voltage (P0, P1, P8) (The other ports) Output Low Voltage (P2, P7, P9) (The other ports)
SYM. VDD IOP1 IOP2 IOP3 IOP4 IOP5 IOP6 IHM1 IHM2 IHM3 IHM4 ISM1 ISM2 ISM3 ISM4 VIH VIL RPH
CONDITIONS -Analog active. VDD = 5V Analog disable VDD = 5V Analog active. VDD = 3V Analog disable VDD = 3V Analog active. VDD = 3V Analog disable VDD = 3V VDD = 5V VDD = 3V VDD = 3V VDD = 3V VDD = 5V VDD = 3V VDD = 3V VDD = 3V --VDD = 3V
MIN. 2.8 --------------0.7 VDD 0 --
TYP. 3.0 9 5 3.1 0.6 1.0 0.4 1.2 0.2 0.1 50 2.0 1.0 1.0 1.0 --400
MAX. 5.5 12 8 4.3 1.8 2.0 1.0 2.0 0.7 0.4 80 3.0 3.0 3.0 3.0 VDD 0.3 VDD --
UNIT V mA mA mA mA mA mA mA mA mA A A A A A VDD VDD K
VOH1 VOH2 VOL1 VOL2
VDD = 4.5 to 5.5V IOH = -10 mA IOH = -0.5 mA VDD = 4.5 to 5.5V IOL = 15 mA IOL = 0.4 mA
2.0 VDD -1.0 ---
-----
--2.0 0.4
V V V V
- 54 -
W921E880A/W921C880
W921E880A EPROM TYPE DC Characteristics, continued
PARAMETER Input Leakage Current (RESET , TEST ) DTMF Output DC Level DTMF Distortion DTMF Output Voltage Pre-emphasis D/A DC Voltage Reference D/A Resoultion
SYM. VIL VTDC VDD VTO
CONDITIONS VIN = 0V VDD = 2.8 to 5.5V ROW Group, RL = 5 K COL/ROW ---
MIN. -1.0 130 1 0 --
TYP. ---30 150 2 -1/256
MAX. 1 3.0 -23 170 3 2/3 --
UNIT A V dB mVrm s dB VDD VDAC
VREF VRSL
W921C880 Mask ROM Type
(VDD-VSS = 3.0V, FOSC = 4.0 MHz, TA = 25 C, unless otherwise specified)
PARAMETER Operating Voltage
SYM. VDD
CONDITIONS 4 MHz 2 MHz 400 KHz
MIN. 2.4 2.0 2.0 ----------- - 0.7 VDD 0
TYP. 1.0 0.7 0.4 2.5 2.2 1.5 0.5 2.0 10 50 1.0 1.0 - -
MAX. 5.5 5.5 5.5 ----------3.0 3.0 VDD 0.3 VDD
UNIT V V V mA mA mA mA mA mA mA mA A A A A VDD VDD
Operating Current (Active Mode) (Analog all off)
IOP VDD = 3V
4 MHz 2 MHz 400 KHz 4 MHz VDD = 5V 2 MHz 400 KHz
Hold Mode Current (Analog all off) Hold Mode Current (Analog all off) Stop Mode Current Input High Voltage Input Low Voltage
IHM1
VDD = 3V, FOSC = 4 MHz VDD = 5V, FOSC = 4 MHz
IHM2
VDD = 3V, FOSC = 32.768 KHz VDD = 5V, FOSC = 32.768 KHz
ISM VIH VIL
VDD = 3V VDD = 5V - -
- 55 -
Publication Release Date: July 1999 Revision A3
W921E880A/W921C880
W921C880 Mask ROM Type, continued
PARAMETER Pull-high Resistor
(P2, P4, P6, PA, PB, PC, PD)
SYM. RPH VOH VOL1 VOL2 VIL VTDC THD VTO
CONDITIONS VDD = 3V IOH = -0.5 mA IOL = 15 mA, port P2 IOL = 0.4 mA, Other ports
MIN. - -1.0 - - - 1.0 130 1
VDD
TYP. 400
MAX. - -
UNIT K V
Output High Voltage Output Low Voltage Input Leakage Current DTMF Output DC Level DTMF Distortion DTMF Output Voltage Pre-emphasis D/A DC Reference Voltage D/A Resolution Voltage
- - - - -30 150 2 -
1/256
2.0 0.4 1 3.0 -23 170 3 2/3 - V A V dB
mVrms
VIN = 0V, RESET pin VDD = 2.8 to 5.5V VDD = 2.8 to 5.5V ROW Group, RL = 5 K Col/Row VDD = 3.0 to 5.5V
dB VDD VDAC
VREF VRSL
- -
0 -
13. PACKAGE DIMENSIONS
80-pin QFP
HD D
80 65
1
64
Symbol
Dimension in inches 0.130 0.004 0.107 0.112 0.117 0.012 0.014 0.004 0.006 0.546 0.551 0.782 0.787 0.025 0.031 0.728 0.964 0.039 0.018 0.010
Dimension in mm 3.30 0.10 2.73 0.30 0.10 2.85 0.35 0.15 2.97 0.45 0.25
Min. Nom. Max. Min. Nom. Max.
E
EH
24
41
A A1 A2 b c D E e HD HE L L1 y
Notes:
0.556 13.87 14.00 14.13 0.792 19.87 20.00 20.13 0.037 0.65 0.80 0.95
0.740 0.752 18.49 18.80 19.10 0.976 0.988 24.49 24.80 25.10 0.047 0.055 1.00 2.21 1.20 2.40 1.40 2.62 0.10 0 12
0.087 0.094 0.103 0.004 0 12
25
e
b
40
c A2 A A1 y
1. Dimension D & E do not include interlead flash. 2. Dimension b does not include dambar protrusion/intrusion. 3. Controlling dimension: Millimeter 4. General appearance spec. should be based on final visual inspection spec.
L L1
See Detail F Seating Plane
Detail F
- 56 -
W921E880A/W921C880
Headquarters
Winbond Electronics (H.K.) Ltd.
Rm. 803, World Trade Square, Tower II, No. 4, Creation Rd. III, 123 Hoi Bun Rd., Kwun Tong, Science-Based Industrial Park, Kowloon, Hong Kong Hsinchu, Taiwan TEL: 852-27513100 TEL: 886-3-5770066 FAX: 852-27552064 FAX: 886-3-5792766 http://www.winbond.com.tw/ Voice & Fax-on-demand: 886-2-27197006
Winbond Electronics North America Corp. Winbond Memory Lab. Winbond Microelectronics Corp. Winbond Systems Lab.
2727 N. First Street, San Jose, CA 95134, U.S.A. TEL: 408-9436666 FAX: 408-5441798
Taipei Office
11F, No. 115, Sec. 3, Min-Sheng East Rd., Taipei, Taiwan TEL: 886-2-27190505 FAX: 886-2-27197502
Note: All data and specifications are subject to change without notice.
- 57 -
Publication Release Date: July 1999 Revision A3


▲Up To Search▲   

 
Price & Availability of W921E880

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X